import request from '@/utils/request'

let { CancelToken } = request;

// 批量退费
export function setBatchRefund(data) {
    return request({
        url: 'admin/therapists/batchRefund',
        method: 'post',
        data
    })
};

// 查询列表
let cancel = null;
export function getBatchRefundList(params) {
    return request({
        url: 'admin/therapists/refund/list',
        method: 'get',
        headers: { cancel: true },
        cancelToken: new CancelToken(cancelFn => {
            cancel && cancel();
            cancel = cancelFn;
        }),
        params
    })
};